package oralExamSchedulingSystemTest;

import junit.framework.*;

import java.util.ArrayList;

import oralExamSchedulingSystem.Group;
import oralExamSchedulingSystem.Student;
import oralExamSchedulingSystem.Time;

import org.junit.Assert;
import org.junit.Test;

public class TestStudent extends TestCase {

	
		public TestStudent(String name)
		{
			super(name);
			
		}
	
        /**
         * Test belong to group.
         */
        @Test
        public void testBelongToGroup_1() {
                Group g1=new Group("101",111,new Time(540,15),"Eng",5);
                Student student=new Student(8001,"ABC",25,"Peter",'M');
                g1.addStudent(student);
                boolean result=student.belongToGroup(g1);
                Assert.assertTrue(result);
        }
        
        /**
         * Test not belong to group.
         */
        @Test
        public void testBelongToGroup_2() {
                Group g1=new Group("101",111,new Time(540,15),"Eng",5);
                Group g2=new Group("101",111,new Time(540,15),"Eng",5);
                Student student=new Student(8001,"ABC",25,"Peter",'M');
                g1.addStudent(student);
                boolean result=student.belongToGroup(g2);
                Assert.assertFalse(result);
        }
}
